package com.example.demo.core.mybatisplus.config;

import com.zaxxer.hikari.HikariDataSource;
import javax.sql.DataSource;
import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

/**
 * @author airhead
 */
@Configuration
@Slf4j
public class DemoMybatisPlusConfig {
  @Bean(name = "db1", typed = true)
  public DataSource db(@Inject("${demo.db}") HikariDataSource dataSource) {
    return dataSource;
  }
}
